﻿using Hx.Domain.Model;

namespace Hx.Domain.Repositories.Dapper
{
    public class AuthorRepository : DapperRepository<Author>, IAuthorRepository
    {
        public AuthorRepository(IRepositoryContext context)
            : base(context)
        {
        }

        public Author GetAuthorByUserName(string userName)
        {
            return DapperContext.Connection.Get<Author>(new { UserName = userName }, "*", true, DapperContext.Transaction);
        }
    }
}